package com.yjhh.chdataservice.util;

import lombok.Data;

/**
 * 分页
 * Created by Leo on 2017/11/23.
 */

@Data
public class PageResultData<T>  extends BaseResultData {

    private T data;

    private long count; //数据总条数

    private Integer pageNum; //当前页

    private Integer size; //每页数据量

    public PageResultData(T data, long count, Integer pageNum, Integer size) {
        this.data = data;
        this.count = count;
        this.pageNum = pageNum;
        this.size = size;
    }

    public PageResultData(int resultCode, String comment, T data, long count, Integer pageNum, Integer size) {
        super(resultCode, comment);
        this.data = data;
        this.count = count;
        this.pageNum = pageNum;
        this.size = size;
    }
    public PageResultData() {}

    public PageResultData(int resultCode, String comment) {
        super(resultCode, comment);
    }

}
